// 
// Decompiled by Procyon v0.5.36
// 

package com.orange.boot.strategy;

import org.springframework.context.ApplicationContext;
import java.util.Map;
import org.springframework.stereotype.Component;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.ApplicationContextAware;

@Component
public class Code2EnvironmentBeanConfig implements ApplicationContextAware, InitializingBean
{
    public static Map<String, GetEnvironmentParaStrategy> code2StrategyMap;
    private ApplicationContext applicationContext;
    
    private Code2EnvironmentBeanConfig() {
    }
    
    public void setApplicationContext(final ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }
    
    public void afterPropertiesSet() {
        this.initGeneratorStrategyMap();
    }
    
    private void initGeneratorStrategyMap() {
        final EnvironmentStrategyBeanFactory environmentStrategy = (EnvironmentStrategyBeanFactory)this.applicationContext.getBean((Class)EnvironmentStrategyBeanFactory.class);
        setGeneratorStrategyMap(EnvironmentStrategyBeanFactory.ENVIRONMENT_PARA_STRATEGY_MAP);
    }
    
    private static void setGeneratorStrategyMap(final Map<String, GetEnvironmentParaStrategy> code2EnvironmentMap) {
        Code2EnvironmentBeanConfig.code2StrategyMap = code2EnvironmentMap;
    }
}
